import 'package:flutter/material.dart';

// 选择器
class DuPicker {

  /// 底部弹出视图
  static Future<T?> showModalSheet<T>(BuildContext context, {Widget? child}) {
    return  showModalBottomSheet<T>(
      context: context,
      useSafeArea: true,
      backgroundColor: Colors.white,
      shape: const RoundedRectangleBorder(
        borderRadius: BorderRadius.only(
          topLeft: Radius.circular(10),
          topRight: Radius.circular(10),
        ),
      ),
      builder: (context) {
        return SizedBox(
          width: double.infinity,
          child: Padding(
            padding: const EdgeInsets.symmetric(vertical: 15),
            child: child,
          ),
        );
      },
    );
  }
}
